﻿#ifndef DINGDANPICKER_H
#define DINGDANPICKER_H

#include <QDialog>
#include "dingdanservice.h"
#include "dingdanpickerstandarditemmodel.h"

namespace Ui {
class DingdanPicker;
}

class DingdanPicker : public QDialog
{
    Q_OBJECT

public:
    explicit DingdanPicker(QWidget *parent = nullptr);
    ~DingdanPicker();

    void setDingdanType(Dingdan::DingdanType widgetType);

    void setDingdansState(Dingdan::DingdanState state);

    void showAndInit();

signals:
    void selectedFinished(Dingdan *dingdan);

private:
    Ui::DingdanPicker *ui;
    DingdanPickerStandardItemModel model;

    DingdanService dingdanService;
    Dingdan::DingdanType type;
    Dingdan::DingdanState state;
};

#endif // DINGDANPICKER_H
